package com.gj.server;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

/**
 * @author: xiaobin
 * @create: 2020-12-18 20:59
 */
public class MyServerHandler extends SimpleChannelInboundHandler<GyroTransferData> {
    @Override
    protected void channelRead0(ChannelHandlerContext channelHandlerContext, GyroTransferData gyroTransferData) throws Exception {
        Byte angleType = gyroTransferData.getAngleType();
        Byte angleSize = gyroTransferData.getAngleSize();
        Byte angle = gyroTransferData.getAngle();
        Byte dataType = gyroTransferData.getDataType();
        Byte no = gyroTransferData.getNo();

        System.out.print("angleType: " + angleType
                + ", angleSize: " + angleSize
                +  ", angle: " + angle
                +  ", dataType: " + dataType
                +  ", no: " + no
        );
        System.out.println("-------------------------");
    }
}
